package com.igor.bookStore.util;

import com.igor.bookStore.inface.User;
import com.igor.bookStore.service.Users;

public class Security {
	public static User authenticate(String userName, String password,
			Users users) {
		User login = null;

		login = users.retrieveSingleUser(userName);
		if (login == null)
			return null;
		if (login.getPassword().equals(password)) {
			return login;
		}
		return null;
	}
}
